home *** CD-ROM | disk | FTP | other *** search
/ Wonky Flux Batch 2019 02 / Wonky_Flux_Batch_2019-02.zip / Wonky Flux Batch 2019-02 / 106 - Proboard KEY Floppy - Must be in Drive 1.dsk / SWORD2.SEGS.SHK / SWORDS.2.MAIN.S < prev   
Text File  |  1989-01-26  |  23KB  |  671 lines

  1. ;  _________________________________________________________________________
  2. ; [_                                                                       _]
  3. ;  _]            Swords & Sorcery II -- The Journey Goes Onward           [_
  4. ; [_                                                                       _]
  5. ;  _]                       by Rubber Duck, @1987                         [_
  6. ; [______________________                           ________________________]
  7. ;                       _]   The ] DuckNet [ BBS   [_
  8. ;                      [_      (405)-355-9678       _]
  9. ;                       _]   300/1200/2400 24hrs   [_
  10. ;                      [_____________________________]
  11.  
  12. ; NOTE: Swords & Sorcery II is NOT a Public Domain program.  It is SHAREWARE.
  13. ;       You may copy and distribute S&S II freely, as long as you leave this
  14. ;       notice intact.  The ShareWare fee for S&S II is --> $0.00 <--, but I
  15. ;       do require that  you register your copy.  Send a  postcard with your
  16. ;       name, your handle/alias (if any), your BBS name, phone number, baud,
  17. ;       hours, version of ACOS, whether or not you have  the original Swords
  18. ;       and Sorcery on your system, and  any comments/suggestions/questions.
  19. ;       Send this to:  Rubber Duck, 4812 NE Winfield Cir, Lawton, OK, 73507. 
  20.  
  21. ; At last, lovers of might and magic,  the sequel to Swords & Sorcery.  S&S II
  22. ; provides an expanded and enhanced world for S&S players.  Many more options,
  23. ; much more detail and character individuality are here.  S&S II also supports
  24. ; the  one-key  options  that  are  now  the  GBBS  standard with version 1.3.
  25.  
  26. ; NOTES ABOUT THIS VERSION: Swords & Sorcery II v2.0    (SWORD2.V2.0.BNY)
  27.  
  28. ; This is the first OFFICIAL RELEASE version of S&S II.  This is NOT A BETA-
  29. ; TEST version, it is a COMPLETE game with an ULTIMATE GOAL.  Hopefully this
  30. ; is the first and LAST version of this program I'll have to put out.  I hate
  31. ; those nasty, creepy, crawly BUGS!
  32.  
  33. ; Thanks to Everyone who registered their Beta-Test copies of S&S II
  34.  
  35. ; Special Thanks to /steve schneider of The RainForest BBS for playtesting,
  36. ; betatesting, debugging, putting up with hassle and writing fixes.  Steve,
  37. ; your assistance and support are both priceless. . . thanks.
  38.  
  39. ; To install Swords & Sorcery II on your system:
  40. ;   1) Copy the files SWORDS.2.MAIN.S, SWORDS.2.AUX.S and SWORDS.2.AUX2.S to
  41. ;      your A2: drivespec.
  42. ;   2) Add this line to your system:
  43. ;         if i$="S2" then link "a2:swords.2.main"
  44. ;   3) Change the link.back routine to suit your system.
  45. ;   4) S&S II writes three files, S2.LOG, S2.LAST.PLAYER, and S2.WINNERS to
  46. ;      the b4: drivespec.  Change this to suit your system.
  47. ;   5) You are ready to go!
  48.  
  49. ; Swords & Sorcery II -- Main Seg
  50.  
  51. ; Professional BBS Custom Edition version 2.0jpe  01/19/89
  52.  
  53.  public return
  54.  public dead
  55.  public exit2
  56.  
  57.  on nocar goto link.term
  58.  
  59.  goto start
  60.  
  61. link.back
  62.  recall "h:var"
  63.  link "a:main.seg","game.list"
  64. link.term
  65.  recall "h:var"
  66.  link "a:main.seg","term1"
  67. return
  68.  on nocar goto link.term
  69.  free:return
  70.  
  71. start
  72.  print \"Please wait..."
  73.  store "h:var":clear:recall "h:var"
  74.  hp=30:xp=0:wp=0:wp$="":sh=0:sh$="":po=0:po$="":s1=0:s2=0:s3=0
  75.  s1$="":s2$="":s3$="":gp=random(300)/10:sg$="":st=random(8)+2:x$=rnd$
  76.  ps=random(8)+2:x$=rnd$:lu=random(8)+2:x$=rnd$:x=random(7):if x=1 sg$="CURUS"
  77.  if x=2 sg$="ROMULUS" :else if x=3 sg$="CENTURIUS"
  78.  if x=4 sg$="SABATHON":else if x=5 sg$="GRATHUS"
  79.  if x=6 sg$="SUBARUS" :else if x=7 sg$="SCHAEFERIUS"
  80.  pr=0:ky=0:ln=0:dr=0:wm=0
  81.  
  82.  print chr$(12):setint(" "):print \\sn$' presents...
  83.  
  84.  ___________________________________
  85. [_                                 _]
  86.  _]      Swords & Sorcery II      [_
  87. [_                                 _]
  88.  _]         The Sorcerors         [_
  89. [_                                 _]
  90.  _]     Journey Goes Onward!      [_
  91. [___________________________________]
  92.  
  93.  
  94. You have set out to seek your fortune
  95.   in a world of Swords and Sorcery!'
  96.  
  97.  setint(""):close
  98.  create "b4:s2.last.player"
  99.  open #1,"b4:s2.last.player"
  100.  input #1,x$,x,y,z
  101.  close
  102.  
  103. ; remove semi-colon below to lock-out last player
  104.  
  105. ; if x$=a1$+" "+a2$ print '
  106. Sorry, you must wait until another adventurer hath played.':goto link.back
  107.  
  108.  print \"The last adventurer was "x$","\"who ";
  109.  if y<1 print "was killed";:else print "finished";
  110.  print " with "z" gold and "x" experience."
  111.  
  112.  goto main
  113.  
  114. maincmds
  115.  setint(" "):print '
  116.  _____________________________
  117. [_                           _]
  118.  _]     J)ourney Onward     [_
  119. [_      I)nventory List      _]
  120.  _]     C)ast  a  Spell     [_
  121. [_      D)rink a Potion      _]
  122.  _]     Q)uit this Game     [_
  123. [_                           _]
  124.  _]     H)all of Heroes     [_
  125. [_____________________________]'\:setint("")
  126.  
  127. main
  128.  free:push main
  129.  if hp<1 goto dead
  130.  gosub adjust.char
  131.  print \"Your Command? ";:get i$
  132.  if instr(i$,"qihdcj")<>0 print chr$(8);i$;
  133.  if i$="h" or i$="H" print "all of Heroes":goto hall
  134.  if i$="q" or i$="Q" print "uit":goto exit
  135.  if i$="i" or i$="I" print "nventory":goto inventory
  136.  if i$="d" or i$="D" print "rink a Potion":goto drink.potion
  137.  if i$="c" or i$="C" print "ast a Spell":goto cast.spell
  138.  if i$="j" or i$="J" print "ourney onward...":goto onward
  139.  if i$="t" or i$="T" print "own...":goto towne
  140.  if i$="?" or i$="/" pop:goto maincmds
  141.  if i$=""  or i$=chr$(13) then i$="<CR>"
  142.  print chr$(8);" "\\"Sorry, "chr$(34);i$;chr$(34)" is not a command.":return
  143.  
  144. onward
  145.  x$=rnd$:x=random(10000) mod 50:x=x+1:x=x+(lu/5):if x>50 then x=50
  146.  if (gp>100) then y=random(999) mod 6:if y=0 then x=2
  147.  
  148. ; *** main jump table ***
  149.  
  150.  if x<=1  goto lightning
  151.  if x<=2  goto gremlins
  152.  if x<=4  goto tax.collector
  153.  if x<=6  goto goblins
  154.  if x<=8  goto satyrs
  155.  if x<=11 goto lg.monster
  156.  if x<=13 goto sm.monster
  157.  if x<=15 goto pit
  158.  if x<=17 goto night
  159.  if x<=19 goto crypt
  160.  if x<=23 goto cave
  161.  if x<=25 goto obelisk
  162.  if x<=27 goto find.weapon
  163.  if x<=29 goto find.shield
  164.  if x<=31 goto find.magic
  165.  if x<=33 goto find.potion
  166.  if x<=36 goto find.scroll
  167.  if x<=38 goto find.gold
  168.  if x<=40 goto find.woman
  169.  if x<=42 goto find.dryad
  170.  if x<=44 goto find.lantern
  171.  if x<=45 goto find.key
  172.  if x<=47 goto towne
  173.  if x<=49 goto castle
  174.  if x<=50 goto tower
  175.  
  176. ; *** exit points
  177.  
  178. exit
  179.  clear key:print \"Are you sure you want to quit? ";:get i$
  180.  if i$="Y" then print chr$(8);"Yes":else print chr$(8);"No"
  181.  if i$<>"Y" return:else pop
  182.  print \"You finish your quest with "xp" experience."
  183. exit2
  184.  create "b4:s2.last.player":close
  185.  open #1,"b4:s2.last.player"
  186.  print #1,a1$" "a2$,xp,hp,gp:close
  187.  create "b4:s2.log":open #1,"b4:s2.log":append #1
  188.  x$=left$(a1$+" "+a2$+"                         ",25)
  189.  x1$=right$("   "+str$(xp),3):x2$=right$("   "+str$(hp),3)
  190.  x3$=right$("   "+str$(gp),3)
  191.  print #1,x$": "x1$" xp, "x2$" hp, "x3$" gp  on "da$" at "time$:close
  192.  print \"Thanks for playing, "a1$" "a2$"!!"
  193.  print \"Swords & Sorcery II by Rubber Duck, 1987"
  194.  goto link.back
  195.  
  196. dead
  197.  pop:setint(" "):print '
  198.          _
  199.       __| |__
  200.      |__   __|
  201.         | |
  202.     ____| |____
  203.    /           \
  204.   |   Rest In   |
  205.   |    Peace    |
  206.   |_____________|'
  207.  setint("")
  208.  print \"You died with "xp" experience."
  209.  goto exit2
  210.  
  211. ; adjust characteristics
  212.  
  213. adjust.char
  214.  x=random(999):x=x mod 6:if x<>0 goto adjust.2
  215.  if lu<4 then lu=lu+1
  216.  if lu>7 then lu=lu-1
  217. adjust.2
  218.  x=random(999):x=x mod 6:if x<>0 goto adjust.3
  219.  if st<4 then st=st+1
  220.  if st>7 then st=st-1
  221. adjust.3
  222.  x=random(999):x=x mod 6:if x<>0 return
  223.  if ps<4 then ps=ps+1
  224.  if ps>7 then ps=ps-1
  225.  return
  226.  
  227. ; *** sub-routines for jump table ***
  228.  
  229. lightning
  230.  print \"You are struck by lightning!";
  231.  if wp$="Enchanted Sword" print \"Your "wp$" absorbs the shock!!":return
  232.  x=random(20):if x>lu then hp=0:print "  Ouch!":return
  233.  print \"You're still alive!  What luck!"
  234.  if hp>11 then hp=hp-10:else hp=1
  235.  return
  236.  
  237. gremlins
  238.  gosub random:x=x+(lu/2)
  239.  print \"Oh, no!  Gremlins!"chr$(7)
  240.  if x>13 print "What luck!  You escaped them!":xp=xp+5:return
  241.  if gp>9 gp=gp-10:print "They've stolen your gold!"chr$(7)
  242.  if (x<=9) and (wp) print "They've stolen your "wp$"!"chr$(7):wp$="":wp=0
  243.  if (x<=7) and (sh) print "They've stolen your "sh$"!"chr$(7):sh$="":sh=0
  244.  if (x<=5) and (ln) print "They've stolen your lantern!"chr$(7):ln=0
  245.  if (x<=3) and (ky) print "They've stolen your golden key!"chr$(7):ky=0
  246.  if (x<=1) and (dr) print "They've kidnapped the Dryad!"chr$(7):dr=0
  247.  if (x<=0) and (pr) print "They've kidnapped the Princess!"chr$(7):dr=0
  248.  return
  249.  
  250. tax.collector
  251.  gosub random:y=x:gosub random:y=y+x:y=y+5
  252.  print \"Oh no, the Tax Collector!"
  253.  print \"He demands "y" gold.  Will you pay? ";:get i$
  254.  if i$="Y" print chr$(8);"Yes":else print chr$(8);"No"
  255.  if i$<>"Y" goto tax.2
  256.  if y>gp print \"What?  Not enough gold!":goto tax.2
  257.  gp=gp-y:print \"He smiles as he takes your gold and leaves.":return
  258. tax.2
  259.  print \"I'll take this tax out of your hide, fool!"
  260.  mn$="Tax Collector":mp=20:md=7:mx=20:gosub battle
  261.  if mp<1 then gosub find.gold:gosub find.gold:gosub find.gold
  262.  if mp<1 print \"My, wasn't he loaded?"
  263.  return
  264.  
  265. goblins
  266.  print \"You are captured by goblins!"
  267.  if (wm+pr+dr)=0 goto goblins2
  268.  print \"They will free you in exchange for your women."
  269.  print "Do you agree to this? ";:get i$
  270.  if i$="Y" print chr$(8);"Yes":else print chr$(8);"No"
  271.  if i$<>"Y" goto goblins2:else print
  272.  wm=0:print "The women scream as they are taken!":pr=0
  273.  if (dr) goto dryad.offended
  274. goblins2
  275.  gosub random:x=x+lu
  276.  if x>16 print \"They leave you to your fate.":return
  277.  if ((gp<5) and (x<=4)) print \"You are sold to the satyrs.":goto satyrs1
  278.  if gp<5 print \"They force you to fight their Cheiftain!"
  279.  if gp<5 mn$="Goblin Cheiftain":mp=15:mx=15:md=5:gosub battle:return
  280.  x=random(100):x=x/5:if x>gp then x=gp
  281.  print \"They take "x" bags of gold and free you.":gp=gp-x:return
  282.  
  283. satyrs
  284.  print \"You are captured by satyrs."
  285. satyrs1
  286.  gosub random:if x<=3 goto satyrs2
  287.  print \"They will free you if you speak the name of their god."
  288.  input "-->" i$:if i$<>sg$ print "Wrong!! ";:goto satyrs2
  289.  print \"You are correct!  The satyrs, defeated, let you go.":xp=xp+5:return
  290. satyrs2
  291.  print "You are to be sacrificed to their god, "sg$"!"
  292.  print "They bring forth their Champion to battle you..."
  293.  print \"(F)ight him or (B)eg for freedom? ";:get i$
  294.  if i$="B" print chr$(8);"Beg":else print chr$(8);"Fight"
  295.  if ((i$="B") and (dr)) gosub dryad.offended
  296.  if i$="B" print "The satyrs scoff at your begging!":xp=xp-2
  297.  mn$="Satyr Champion":mp=18:mx=18:md=6:gosub battle:return
  298.  
  299. lg.monster
  300.  x$=rnd$:x=random(5):x=x+(lu/5):mn$=""
  301.  if x<=1 mn$="Skeleton":  mp=11:mx=11:md=6
  302.  if x=2 mn$="Giant Cobra":mp=6: mx=12:md=7
  303.  if x=3 mn$="Troll":      mp=10:mx=10:md=5
  304.  if x=4 mn$="Wolverine":  mp=8: mx=8: md=5
  305.  if x=5 mn$="Wild Dog":   mp=6: mx=6: md=4
  306.  if mn$<>"" print \"Oh, no!  You are attacked by a "mn$"!":gosub battle:return
  307.  goto sm.monster
  308.  
  309. sm.monster
  310.  x$=rnd$:x=random(100):x=x mod 6
  311.  if x<=1 mn$="a rabid rat!"
  312.  if x=2 mn$="a snake!"
  313.  if x=3 mn$="a large spider!"
  314.  if x=4 mn$="a giant scorpion!"
  315.  if x=5 mn$="strangle vines!"
  316.  print \"Oh, no!  You are attacked by "mn$
  317.  if (x<=4) and (wp>=5) print \"You kill it with your "wp$"!":xp=xp+5:return
  318.  if (x<=4) and (wp) print \"You manage to kill it, barely.":xp=xp+3:return
  319.  if (x<=4) and (sh) print \"You fend it off with your "sh$".":xp=xp+3:return
  320.  if (x<=4) print \"You are wounded by the creature!":hp=hp-2:if hp<1 hp=1
  321.  if (x<=4) return
  322.  if (wp) print \"You fend them off with your "wp$"!":xp=xp+5:return
  323.  print \"Choke! They strangle you viciously!":hp=hp-3:if hp<1 hp=1
  324.  return
  325.  
  326. pit
  327.  print \"Oh, no!  A pit!!":gosub random:x=x+lu:y=0
  328.  if x>=9 print \"You avoided it, lucky devil!":xp=xp+5:return
  329.  print \"Ahhhhh!!  Plunk!!  Ouch!":if hp>2 then hp=hp-3:gosub hurt.rest
  330.  gosub random
  331.  if x<=4 print \"You slip and slide for some distance, winding up in a cave."
  332.  if x<=4 print \"The cave exit is east.":gosub random:x=x+(lu/5):goto cave.0
  333.  print \"You are at the bottom of a pit."
  334. pitted
  335.  print \"You may (Y)ell for help, or try to (C)limb out."
  336.  print \"What do you do? ";:get i$
  337.  if i$<>"Y" print chr$(8);"Climb"
  338.  if i$="Y" print chr$(8);"Yell":goto pitted2
  339.  gosub random:x=x+(st/2)
  340.  if (x<=5) or (y=1) print "It's too slippery!":y=1:goto pitted
  341.  if x<=8 print "You don't have strength enough!":goto pitted
  342.  print \"You manage to climb out!!":xp=xp+4:return
  343. pitted2
  344.  print \"H E L P ! ! !"
  345.  gosub random:x=x+(lu/5)
  346.  if x<=6 print \"No help arrives.":xp=xp-1:goto pitted
  347.  print \"A rope is lowered..."
  348.  if x<=3 goto goblins
  349.  print \"You are rescued by a woman who joins you.":wm=wm+1:return
  350.  
  351. night
  352.  print \"Night falls..."
  353.  if hp<10 gosub hurt.rest
  354.  print \"You go to sleep for the night..."
  355.  gosub random:x=x+(lu/5)
  356.  if x<=2 print \"You are suddenly awakened...":goto lg.monster
  357.  if x<=4 print \"You are suddenly awakened...":goto sm.monster
  358.  print \"You awake the next day rested and ready."
  359.  if hp<=25 then hp=hp+2
  360.  return
  361.  
  362. hurt.rest
  363.  print \"You are hurt.  You must rest..."
  364.  hp=hp+2:if hp>30 hp=30
  365.  return
  366.  
  367. crypt
  368.  print \"You reach an overgrown graveyard."
  369.  print  "The headstones bear strange runes."
  370.  print  "In the middle there is a mausoleum..."
  371.  print \"Do you (E)nter the crypt or (L)eave? ";:get i$
  372.  if i$<>"L" print chr$(8);"Enter"
  373.  if i$="L" print chr$(8);"Leave":xp=xp+2:return
  374.  x$=rnd$:x=random(5):x=x+(lu/3)
  375.  if x<=3 goto lg.monster
  376.  if x<=5 goto sm.monster
  377.  print \"There is a coffin inside...will you open it? ";:get i$
  378.  if i$="Y" print chr$(8);"Yes":else print chr$(8);"No"
  379.  if i$<>"Y" xp=xp-2:if lu>5 return
  380.  if i$<>"Y" print "It opens by itself!"
  381.  gosub random
  382.  if x<=1 gosub find.magic
  383.  if x<=2 gosub find.scroll
  384.  if x<=3 goto find.gold
  385.  if x<=8 print "Oh, no!  A Zombie!":mn$="Zombie"
  386.  if x<=8 then  mp=8:md=6:mx=10:gosub battle:return
  387.  print \"There is flash...oh, no!  A vampire appears!"
  388.  mn$="Vampire":mp=17:md=8:mx=25:gosub battle:return
  389.  
  390. cave
  391.  x=random(100):x=x mod 13:print \"You come to a cave..."
  392. cave.0
  393.  if x<=4 print \"Oh, no!  This is a Troll's cave!"
  394.  if x<=4 mn$="Troll":mp=10:md=5:mx=10:gosub battle:return
  395.  if x<=6 print \"This cave is empty.":return
  396.  if x<=9 gosub find.gold:goto cave.1
  397.  if x<=10 gosub find.weapon:goto cave.1
  398.  if x<=11 gosub find.shield:goto cave.1
  399.  if x<=12 gosub find.magic:goto cave.1
  400. cave.1
  401.  print \"The cave goes back some ways, then winds down into the darkness."
  402.  if not(ln) print "It is VERY dark down there.  You could be eaten by a Grue!"
  403.  if (ln) print "Your lantern is lit..."
  404.  print \"Do you (C)ontinue down or (L)eave? ";:get i$
  405.  if i$="L" print chr$(8);"Leave":else print chr$(8);"Continue"
  406.  if ((i$="L") and (ln=0)) then xp=xp+5
  407.  if i$="L" print \"You retrace your steps and leave the cave.":return
  408.  if (ln=0) print \"You stumble down into the darkness...oh no!  A GRUE!"
  409.  if (ln=0) mn$="The Dreaded Grue":mp=30:mx=30:md=6:gosub battle
  410.  if (ln=0) and (mp>0) print \"You run out of the cave.":return
  411.  if (ln=0) print \"You find the lantern of the Grue's last victim!":ln=1
  412.  print \"You continue down and enter a worked stone passage."
  413.  print "It splits in two directions."
  414. cave.split
  415.  print \"Do you go (L)eft or (R)ight? ";:get i$
  416.  if i$="L" print chr$(8);"Left":goto cave.left
  417.  if i$="R" print chr$(8);"Right":goto cave.right
  418.  goto cave.split
  419. cave.left
  420.  print \"The passage continues for twenty feet."
  421.  print  "Suddenly the floor drops away!  Ahhhh...."
  422.  if hp>1 then hp=hp-3
  423.  gosub hurt.rest: print \"You are at the bottom of the trap."
  424.  x$=rnd$:x=random(5):if x>=5 gosub find.gold
  425.  gosub random:if x<=4 gosub sm.monster
  426.  print \"There is an exit passage!  You escape!":return
  427. cave.right
  428.  print \"The passage curves and twists for fifty feet or so."
  429.  if og=1 print "You reach the Ogre's den again."
  430.  if og=1 print "The backdoor is still open, so you leave the cave.":return
  431.  print  "You come to a large chamber, with furs and bags of gold lying about."
  432.  print  "Oh, no!  It's an Ogre's den!!!"
  433.  mn$="Ogre":mp=15:mx=15:md=6:og=1:gosub battle
  434.  if mp<1 gosub find.gold:gosub find.gold:gosub find.key
  435.  print \"You find a secret door!  It leads out of the cave.":return
  436.  
  437. obelisk
  438.  print \"You find a Satyr Obelisk covered in writing."
  439.  print \"(R)ead it or (L)eave? ";:get i$
  440.  if i$="L" print chr$(8);"Leave":else print chr$(8);"Read it"
  441.  if i$="L" return
  442.  x$=rnd$:x=random(5):x=x+(lu/2)
  443.  if (x<=5) print \"Oh, no!  This is a curse!"
  444.  if ((x<=5) and (st>2)) then st=st-1
  445.  if ((x<=5) and (ps>2)) then ps=ps-1
  446.  if (x<=3) print "You've conjured up a Zombie!"
  447.  if (x<=3) then mn$="Zombie":mp=8:md=4:mx=8:gosub battle:return
  448.  if (x<=5) return
  449.  print \"It is a prayer to the Satyr god, "sg$".":return
  450.  
  451. ; *** FINDS
  452.  
  453. find.weapon
  454.  a$="weapon": link "a2:swords.2.aux2","find"
  455. find.shield
  456.  a$="shield": link "a2:swords.2.aux2","find"
  457. find.magic
  458.  a$="magic":  link "a2:swords.2.aux2","find"
  459. find.potion
  460.  if (po>0) return
  461.  a$="potion": link "a2:swords.2.aux2","find"
  462. find.scroll
  463.  a$="scroll": link "a2:swords.2.aux2","find"
  464. find.woman
  465.  a$="woman":  link "a2:swords.2.aux2","find"
  466. find.dryad
  467.  if (dr=1) return
  468.  a$="dryad":  link "a2:swords.2.aux2","find"
  469. find.lantern
  470.  if (ln=1) return
  471.  a$="lantern":link "a2:swords.2.aux2","find"
  472.  
  473. find.gold
  474.  x$=rnd$:x=random(15)
  475.  x=x+1:x=x+(lu/2)
  476.  print \"You find "x" bags of gold!"
  477.  gp=gp+x:return
  478.  
  479. find.key
  480.  if (ky) return
  481.  print \"Your eye is catches a glint of metal...";
  482.  print  "You find a Golden Key!":ky=1:return
  483.  
  484. ; end FINDS
  485.  
  486. towne
  487.  link "a2:swords.2.aux","towne"
  488. castle
  489.  link "a2:swords.2.aux2","castle"
  490. tower
  491.  if pr=1 return
  492.  link "a2:swords.2.aux2","tower"
  493.  
  494. ; *** notes
  495.  
  496. ; all calls to BATTLE must be GOSUBs, so that if a player dies in BATTLE,
  497. ; the resulting POP:GOTO DEAD doesn't POP MAIN off the stack.  DEAD will
  498. ; take care of POPping MAIN.
  499.  
  500. battle
  501.  print \"The battle begins!":ba=1
  502.  print \"You and the "mn$" circle for position!"
  503. who.first
  504.  gosub random:x=x+(st/5)
  505.  if x<=5 gosub monstermove:gosub playermove:goto who.first
  506.  gosub playermove:gosub monstermove:goto who.first
  507.  
  508. battlexit
  509.  ba=0:return
  510.  
  511. playermove
  512.  print \"Your move!  ";
  513. player0
  514.  print "Your options are:"
  515.  print \"   F)lee"
  516.  if (s1+s2+s3) print  "   C)ast a Spell"
  517.  if (po) print  "   D)rink a Potion"
  518.  print  "   A)ttack Enemy with ";
  519.  if (wp) print wp$:else print "Bare Hands"
  520.  print \"What do you do? ";:get i$
  521.  if i$="F" print chr$(8);"Flee"
  522.  if i$="C" print chr$(8);"Cast a Spell"
  523.  if i$="D" print chr$(8);"Drink a Potion"
  524.  if i$="A" print chr$(8);"Attack Enemy"
  525.  if ((i$="F") and (hp>10)) then xp=xp-3:if xp<1 xp=1
  526.  if i$="F" gosub flee:print "You manage to escape!":pop:goto battlexit
  527.  if i$="C" gosub cast.spell:goto endplayermove
  528.  if i$="D" gosub drink.potion:goto endplayermove
  529.  if i$<>"A" print \\"Sorry, ";chr$(34);i$;chr$(34);" is invalid."\:goto player0
  530.  gosub random:print \"You attack with your ";
  531.  if (wp) print wp$:else print "Bare Hands"
  532.  print:x=x+(st/3):if wp=5 then x=x+1
  533.  if x<=5 print "You missed!":goto endplayermove
  534.  gosub random:x=x/5:x=x+wp:x=x+(st/5)
  535.  if not(info(2)) tone (100,50):tone (100,50): else print chr$(7);
  536.  print "You hit him for "x" damage!!!"
  537.  if (x>mp) then mp=0:else mp=mp-x
  538. endplayermove
  539.  if (mp<1) then pop:print "You've finished the "mn$" off!!!!"
  540.  if (mp<1) then xp=xp+mx:gosub find.gold:goto battlexit
  541.  print "He has "mp" hit points now...":return
  542.  
  543. monstermove
  544.  print \"The "mn$" attacks!"
  545.  gosub random:x=x+(lu/5)
  546.  if x>5 print "The foul creature misses you!":return
  547.  print "A hit!!  ";:if info(2) print chr$(7);chr$(7);: else tone (200,100)
  548.  y=5-x:x=random(100):x=x mod md:x=x+1:x=x+(y/2)
  549.  if sh>=x then x=1:else x=x-sh
  550.  if x>hp then hp=0:else hp=hp-x
  551.  if hp<1 print \\"You've had it!":pop:pop:ba=0:goto dead
  552.  if x<=2 print "Only a flesh wound...":goto endmonst
  553.  if x<=4 print "The wound is not bad...":goto endmonst
  554.  print "A vicious attack!"
  555. endmonst
  556.  print "You have "hp" hit points now...":return
  557.  
  558. flee
  559.  gosub random:if x<7 return
  560.  print \"The "mn$" blocks your escape!":pop:goto endplayermove
  561.  
  562.  
  563. ; *** inventory
  564.  
  565. inventory
  566.  print \'
  567. Stats:
  568.  Strength: 'st'  Psyche: 'ps'  Luck: 'lu'
  569.  Hit Points: 'hp'  Experience Points: 'xp'
  570.  
  571. Inventory:'
  572.  if (wp) print " "wp$
  573.  if (sh) print " "sh$
  574.  if (po) print " "po$
  575.  if (ky) print " Golden Key"
  576.  if (ln) print " Lantern"
  577.  if (s1) or (s2) or (s3) print " Spells:"
  578.  if (s1) print "  "s1$
  579.  if (s2) print "  "s2$
  580.  if (s3) print "  "s3$
  581.  if (pr) or (wm) or (dr) print " Companions:"
  582.  if (pr) print "  The Princess"
  583.  if (dr) print "  The Dryad Guide"
  584.  if (wm=1) print "  1 woman"
  585.  if (wm>1) print "  "wm" women"
  586.  if (gp=0) print " No gold"
  587.  if (gp=1) print " 1 bag of gold"
  588.  if (gp>1) print " "gp" bags of gold"
  589.  print:return
  590.  
  591. ; *** potions & spells
  592.  
  593. drink.potion
  594.  if not(po) print \"You aren't carrying a Potion!":return
  595.  print \"You are carrying: "po$
  596.  print \"Drink it now? ";:get i$
  597.  if i$="Y" print chr$(8);"Yes":else print chr$(8);"No"
  598.  if i$<>"Y" print \"You return the Potion to your pack.":return
  599.  print \"Gulp...gulp...gulp...";
  600.  if (po=1) print "ahh!  How refreshing!":hp=hp+10
  601.  if ((po=1) and (hp>30)) then hp=30
  602.  if (po=2) print "ugh!  Blah!  Poison!":if hp>10 hp=hp-10
  603.  if ((po=2) and (hp<=10)) then hp=1
  604.  if (po=3) print "umm!  How invigorating!":st=st+2
  605.  if ((po=3) and (st>10)) then st=10
  606.  if (po=4) print "ooh!  How enlightening!":ps=ps+2
  607.  if ((po=4) and (ps>10)) then ps=10
  608.  if (po=5) print "nnnuh!  You feel weak!":if st>2 st=st-2
  609.  if ((po=5) and (st<=2)) then st=1
  610.  if (po=6) print "duh?  Duh?  Yuk!":if ps>2 ps=ps-2
  611.  if ((po=6) and (ps<=2)) then ps=1
  612.  po$="":po=0:return 
  613.  
  614. cast.spell
  615.  if not(s1+s2+s3) print \"You don't know any Spells!":return
  616.  print \"You may cast the following:"
  617.  if (s1) print "1) "s1$
  618.  if (s2) print "2) "s2$
  619.  if (s3) print "3) "s3$
  620.  print "4) Don't cast anything"
  621.  print \"Which shall you cast? ";:get i$
  622.  x=val(i$):if (x=0) or (x=4) goto cast.none
  623.  if (x=1) and not(s1) goto cast.none
  624.  if (x=2) and not(s2) goto cast.none
  625.  if (x=3) and not(s3) goto cast.none
  626.  if x=1 sc$=s1$:sc=s1:s1$="":s1=0
  627.  if x=2 sc$=s2$:sc=s2:s2$="":s2=0
  628.  if x=3 sc$=s3$:sc=s3:s3$="":s3=0
  629.  print chr$(8);sc$
  630. spell.effects
  631.  gosub random:x=x+(ps/2)
  632.  if x<=4 print \"Spell failed!":return
  633.  print \"Spell succeeded!"
  634.  if (sc=1) print "You feel refreshed!":hp=hp+10:if hp>30 hp=30
  635.  if (sc=2) print "You feel invigorated!":st=st+2:if st>10 st=10
  636.  if (sc=3) print "You feel enlightened!":ps=ps+2:if ps>10 ps=10
  637.  if (sc=4) print "You feel luckier!":lu=lu+2:if lu>10 lu=10
  638.  if (sc=5) print "You are Teleported away!":if ba=1 then pop:pop:ba=0
  639.  if (sc=5) goto towne
  640.  if (sc=6) and (ba=0) print "Your Fireball shoots away, wasted!":return
  641.  if (sc=6) print "Your Fireball hits the "mn$"!!"
  642.  if (sc=6) and (mp>4) then mp=mp-5
  643.  if (sc=6) and (mp<5) then mp=0
  644.  return
  645. cast.none
  646.  print chr$(8);"None":return
  647.  
  648. dryad.offended
  649.  print \"The Dryad is offended!"
  650.  print  "She curses you and leaves.":dr=0
  651.  if lu>2 then lu=lu-2:else lu=1
  652.  if xp>10 then xp=xp-3:else xp=1
  653.  return
  654.  
  655. ; seed random number generator and
  656. ; get a random number zero to nine
  657.  
  658. random
  659.  x$=rnd$:x=random(100):x=x mod 10:return
  660.  
  661. hall
  662.  close:f$="b4:s2.winners":open #1,f$
  663.  if mark(1) close:print \"No one has won the game here yet.":return
  664.  print '
  665.  ______________________________
  666. [_                            _]
  667.  _]    Swords & Sorcery II   [_
  668. [_                            _]
  669.  _]      Hall of Heroes      [_
  670. [______________________________]'\:copy #1:close:return
  671.